package com.yy.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.yy.mapper.BannernewsDao;
import com.yy.model.BannernewsEntity;
import com.yy.service.BannernewsService;


/**
 * 轮播图
 * 
 * @author yy
 * @email 
 * @date 2017-07-16 17:45:48
 */
@Service("bannernewsService")
public class BannernewsServiceImpl implements BannernewsService {
	@Autowired
	private BannernewsDao bannernewsDao;
	
	@Override
	public BannernewsEntity queryObject(Integer id){
		return bannernewsDao.queryObject(id);
	}
	
	@Override
	public List<BannernewsEntity> queryList(Map<String, Object> map){
		return bannernewsDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return bannernewsDao.queryTotal(map);
	}
	
	@Override
	public void save(BannernewsEntity bannernews){
		bannernews.setCreateTime(new Date());
		bannernewsDao.save(bannernews);
	}
	
	@Override
	public void update(BannernewsEntity bannernews){
		bannernews.setCreateTime(new Date());
		bannernewsDao.update(bannernews);
	}
	
	@Override
	public void delete(Integer id){
		bannernewsDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		bannernewsDao.deleteBatch(ids);
	}
	
}
